program_name := libstring.a
source_dirs := src
include_dirs := include
source_dirs := $(addprefix ../, $(source_dirs))
include_dirs := $(addprefix ../, $(include_dirs))
search_wildcards := $(addsuffix /*.cpp, $(source_dirs))
$(program_name): $(notdir $(patsubst %.cpp, %.o, $(wildcard $(search_wildcards))))
	ar ru $@  $^
VPATH := $(source_dirs)
%.o: %.cpp
	g++ -c -MD $(compile_flags) $(addprefix -I,$(include_dirs)) $<
include $(wildcard   *.d)
